[Diagnostics] Add EventPipe Buffer Mode and EventFilter and update Collect-Linux - #55628
Draft
mdh1418 wants to merge 8 commits into
Draft
[Diagnostics] Add EventPipe Buffer Mode and EventFilter and update Collect-Linux#55628mdh1418 wants to merge 8 commits into
mdh1418 wants to merge 8 commits into
Conversation
Add Microsoft.Diagnostics.NETCore.Client reference for EventPipeBufferingMode, EventPipeProviderEventFilter, the new EventPipeSessionConfiguration and EventPipeProvider overloads and properties, and the UnknownCommandException and InvalidCommandArgumentException types. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
dotnet-gcdump collect/report default to non-lossy (Block) with automatic fallback on older runtimes; dotnet-trace collect adds an opt-in --buffering-mode (default Drop). Block requires a .NET 11+ target runtime. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add DOTNET_EventPipeBufferingMode and DOTNET_EventPipeOutputStreaming to the EventPipe environment-variable reference, and note the non-lossy opt-in on the circular-buffer guidance. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Remove the --buffering-mode option from dotnet-gcdump (it now always collects non-lossy and falls back to lossy on pre-.NET 11 targets). Replace the dropped UnknownCommandException and InvalidCommandArgumentException with the new BadEncodingException and fix the UnsupportedCommandException base type. Clarify that non-lossy buffering is bounded by buffer capacity and can still drop events under host memory exhaustion or during shutdown, and correct the DOTNET_EventPipeBufferingMode invalid-value and streaming-session behavior. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com>
mdh1418
requested review from
hoyosjs and
noahfalk
and
a lite review from Copilot
August 21, 2026 16:02
Contributor
There was a problem hiding this comment.
Pull request overview
Updates .NET diagnostics documentation to reflect newer EventPipe capabilities (provider event ID filtering and non-lossy buffering) and aligns dotnet-trace/dotnet-gcdump guidance with the newer runtime behavior.
Changes:
- Document
EventPipeBufferingModeandEventPipeProviderEventFilterin theMicrosoft.Diagnostics.NETCore.ClientAPI reference. - Add
DOTNET_EventPipeBufferingModeguidance and describe non-lossy buffering behavior for streaming sessions. - Add
dotnet-trace collect --buffering-modeand remove the preview banner text fordotnet-trace collect-linux, plus clarifydotnet-gcdumpbuffering behavior.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| docs/core/diagnostics/microsoft-diagnostics-netcore-client.md | Adds API surface documentation for buffering mode and per-provider event ID filtering. |
| docs/core/diagnostics/eventpipe.md | Documents non-lossy buffering via DOTNET_EventPipeBufferingMode for startup/streaming sessions. |
| docs/core/diagnostics/dotnet-trace.md | Adds --buffering-mode option and removes collect-linux preview banner wording. |
| docs/core/diagnostics/dotnet-gcdump.md | Notes non-lossy buffering behavior and updates troubleshooting guidance accordingly. |
Suppressed comments (1)
docs/core/diagnostics/microsoft-diagnostics-netcore-client.md:433
- The "Constructor" signature block for
EventPipeProvideris missing the terminating);for both overloads, so the snippet isn’t valid C# syntax.
string name,
EventLevel eventLevel,
long keywords,
IDictionary<string, string> arguments,
EventPipeProviderEventFilter eventFilter)
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
noahfalk
reviewed
Aug 21, 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: a5765868-3160-4052-b7cd-86df02acb53b
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
In .NET 10, EventFilter was added for EventPipe sessions to filter which eventIDs to disable or enable.
In .NET 11, EventPipe introduces a new buffering mode for loss-less event collection, as opposed to the typical lossy mode which drops events when buffers are full.
Also removes the preview banner/wording for dotnet-trace collect-linux
Internal previews